import 'package:flutter/material.dart';
import 'package:flutter_changdian_football/widget/screenutil/custom_screenutil.dart';

// 动态
class DynamicWidget extends StatelessWidget {
  const DynamicWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      child: Column(
        children: [
          Expanded(
            child: ListView.separated(
              physics: const NeverScrollableScrollPhysics(),
              itemCount: 10,
              padding: EdgeInsets.symmetric(vertical: 0.w, horizontal: 15.w),
              separatorBuilder: (context, index) {
                return SizedBox(height: 16.w,);
              },
              itemBuilder: (BuildContext context, int index) {
                return SizedBox(
                  child: Row(
                    children: [
                      Container(
                        width: 36.w,
                        height: 36.w,
                        decoration: BoxDecoration(
                          color: const Color(0xffEDF5F1),
                          borderRadius: BorderRadius.circular(36.r)
                        ),
                        padding: EdgeInsets.all(2.w),
                        child: ClipRRect(
                          borderRadius: BorderRadius.circular(36.r),
                          child: Container(
                            color: Colors.red,
                          ),
                        ),
                      ),

                      SizedBox(width: 8.w,),

                      Expanded(
                        child: RichText(
                          text: TextSpan(
                            children: [
                              TextSpan(
                                text: 'LMP',
                                style: TextStyle(fontSize: 14.sp, color: const Color(0xff499360), fontWeight: FontWeight.w400)
                              ),
                              TextSpan(
                                text: '离开了俱乐部',
                                style: TextStyle(fontSize: 14.sp, color: const Color(0xff222222), fontWeight: FontWeight.w400)
                              )
                            ]
                          )
                        ),
                      ),

                      SizedBox(
                        child: Text('2022-02-26', style: TextStyle(fontSize: 12.sp, color: const Color(0xff999999)),),
                      )
                    ],
                  ),
                );
              },
            ),
          )
        ],
      ),
    );
  }
}